package com.yuoj.yuojbackendserviceclient.service;

import com.yuoj.backendcommon.entity.Question;
import com.yuoj.backendcommon.entity.QuestionSubmit;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
* @author Administrator
* @description 针对表【question(题目表)】的数据库操作Service
* @createDate 2025-01-12 21:33:08
*/
@FeignClient(name = "yuoj-backend-question-service",path = "/api/question/inner")
public interface QuestionFeignClient {

    /**
     * 根据id获取提交题目信息
     * @param questionSubmitId
     * @return
     */
    @GetMapping("/question_submit/get/id")
    QuestionSubmit getQuestionSubmitById(@RequestParam("questionSubmitId") long questionSubmitId);

    /**
     * 更新题目提交信息
     * @param questionSubmit
     * @return
     */
    @PostMapping("/update/questionSubmit")
    boolean updateQuestionSubmitById(@RequestBody QuestionSubmit questionSubmit);

    /**
     * 更新题目信息
     * @param question
     * @return
     */
    @PostMapping("/update/question")
    boolean updateQuestionById(@RequestBody Question question);

    /**
     * 根据id获取题目信息
     * @param questionId
     * @return
     */
    @GetMapping("/question/get/id")
    Question getQuestionById(@RequestParam("questionId") long questionId);



}
